import { defineStore } from 'pinia';
// shop模块
export const useShopStore = defineStore('shop123', {
  state: () => ({
    title: 'hello shop'
  }),
  getters: {
    g1: (state) => state.title + '!!'
  },
  actions: {
    add(x, y) {
      return x + y;
    }
  },
});

// cart模块
export const useCartStore = defineStore('cart', {
  state: () => ({
    title: 'hello cart'
  }),
  getters: {
    g1: (state) => state.title + '!!'
  },
  actions: {
    add(x, y) {
      return x + y;
    }
  },
});